export default class Record {
  static _ins: Record
  static get instance() {
    return Record._ins || new Record
  }
  constructor() {
    Record._ins = this
  }

  init() {

    /** google */
    window.dataLayer = window.dataLayer || [];

    // (function (d, s, id) {
    //   var js: HTMLScriptElement, fjs = d.getElementsByTagName(s)[0];
    //   if (d.getElementById(id)) {
    //     return;
    //   }
    //   js = <HTMLScriptElement>d.createElement(s);
    //   js.id = id;
    //   js.async = true
    //   js.src = "https://www.googletagmanager.com/gtag/js?id=UA-102180151-40";
    //   fjs.parentNode.insertBefore(js, fjs);
    // }(document, 'script', 'google-jssdk'));

    // this.gtag('js', new Date());
    // this.gtag('config', 'UA-102180151-40');

  }

  gtag(...args) {
    window.dataLayer.push(arguments);
  }

}